<template>
  <d2-container better-scroll>
    <!-- 主体表格 -->
    <licenseApplicationList :applyList="applyList"/>
    <!-- 尾部页码显示 -->
    <template slot="footer">
     <pagination @getApplyList="getApplyList" :total="total"/>
    </template>
  </d2-container>
</template>

<script>
import licenseApplicationList from '@/components/licenseApplicationList'
import pagination from '@/components/pagination'
import { getUnprocessedLicenseApplication } from '@/api/licenseApplication'

export default {
  name: 'unprocessed-licenseRecord',
  data () {
    return {
      brandNumber: '',
      id: 1,
      total: 0,
      current: 1,
      size: 8,
      thStyle: {
        fontSize: '16px'
      },
      applyList: []
    }
  },
  created () {
    this.getApplyList(this.size, this.current)
  },
  methods: {
    getApplyList (size, current) {
      getUnprocessedLicenseApplication({ pageNum: current, pageSize: size, status: 0 }).then(res => {
        this.applyList = res.list
        this.total = res.total
      }).catch(err => {
        console.log('err', err)
      })
    } },
  components: {
    licenseApplicationList,
    pagination
  }
}
</script>

<style>

</style>
